<template>
  <div>
    <div class="container1">
      <div class="common-title-flex">
        <div class="common-title-div"></div>
        <div class="common-title-text">附件管理查询条件</div>
      </div>
      <el-form ref="searchObj" :inline="true" :model="searchObj" size="mini" label-width="100px" style="margin-bottom: -10px; margin-top: 10px">
        <el-form-item label="附件名称">
          <el-input v-model="searchObj.fileName" placeholder="请输入" clearable></el-input>
        </el-form-item>
        <el-form-item style="margin-left: 2rem">
          <el-button type="primary" icon="el-icon-search" @click="queryList">查询</el-button>
          <el-button @click="reset" icon="el-icon-refresh">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="container" style="margin-top: 1rem">
      <div class="common-list-class">
        <div style="display: flex">
          <div class="common-title-div"></div>
          <div class="common-title-text">附件管理查询列表</div>
        </div>
        <div style="display: flex">
          <el-button type="primary" style="height: 32px" icon="el-icon-circle-plus-outline" @click="addAttachment">上传附件</el-button>
        </div>
      </div>
      <!-- 查询列表 -->
      <el-table :data="tableData" size="mini" :row-style="rowStyle" :header-cell-style="tableHeaderColor" style="width: 100%; margin-top: 10px; margin-bottom: 10px" @selection-change="handleSelectionChange" @cell-click="cellChange" max-height="550" border>
        <el-table-column prop="attachmentName" label="附件名称" show-overflow-tooltip align="center">
        </el-table-column>
        <el-table-column prop="attachmentAddr" width="650px" label="附件地址" show-overflow-tooltip align="center">
        </el-table-column>
        <el-table-column prop="updateTime" label="上传时间" show-overflow-tooltip align="center">
        </el-table-column>
      </el-table>
      <!-- 分页 -->
      <el-row type="flex" justify="end">
        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="pageSizes" :page-size="pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total">
        </el-pagination>
      </el-row>
    </div>
    <!-- 上传附件 -->
    <el-dialog title="附件上传" :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="perfectFlag" width="70%" :before-close="cancel">
      <div slot="title" class="header-title">
        <div class="header-title-div"></div>
        <div class="header-title-text">附件上传</div>
      </div>
      <el-form :model="profileObj" ref="profileObj" class="demo-ruleForm" size="mini" label-width="150px" style="margin-bottom: -10px; margin-top: 10px">
        <el-row style="margin-bottom:15px">
          <!-- 上传视频 -->
          <el-col :span="20">
            <el-form-item label="视频上传" style="margin:0;">
              <!-- :auto-upload="false" -->
              <el-upload class="avatar-uploader" ref="upload" :limit="1" :on-exceed="handleExceed2" :headers="uploadHeader" :on-error="onErrorMethod3" :action="uploadUrl" :data="uploadDataVideo" :show-file-list="true" :on-success="handleVideoSuccess" :before-upload="beforeVideoUpload" :on-remove="handleRemove" :on-preview="handlePreview">
                <!-- <img v-if="imageUrl" :src="imageUrl" class="avatar" /> -->
                <i class="el-icon-camera avatar-uploader-icon"></i>
              </el-upload>
              <div v-if="this.videoCode==20000" style="font-size: 12px;display: block;text-align:center">
                视频地址：{{this.videoAddr}}
              </div>
            </el-form-item>
          </el-col>
          <el-col style="margin-top:15px">
            <div style="font-size: 12px;color: #aaa;width: 100%;dispaly:block;text-align:center">
              视频大小：小于500M
            </div>
          </el-col>
          <!-- <el-col :span="20" v-if="this.videoCode==20000">
            
          </el-col> -->
        </el-row>
        <el-row>
          <el-col style="margin-bottom: 20px" align="center">
            <el-button @click="submitForm" :disabled="this.disabled">删除</el-button>
            <el-button type="primary" @click="resetdetermine">完成</el-button>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import mixin from "@/mixin/mixin.js";
export default {
  name: "meeting",
  mixins: [mixin],
  data() {
    return {
      disabled: true,
      fileUrluploadList: [],
      fileUrlList: [],
      fileUrlList1: [],
      UrlList: [],
      zhaopinhuiObj: {},
      zhaopinhuiFlag: false,
      detailsGWObj: {},
      detailsgangweiFlag: false,
      centerDialogVisible: false,
      tablegwList: [],
      detailsqiyeObj: {},
      detailsqiyeFlag: false,
      canhuiqiyeFlag: false,
      tableqiyeData: [],
      canjiashenqtitle: "",
      tablegangweiData: [],
      newFlag: false,
      createTime: [],
      progressFlag: false,
      uploadHeader: {},
      uploadUrl: "/wgry/system/uploadFile",
      uploadData: {},
      uploadData2: {},
      uploadDataVideo: {},
      customize: "",
      rules: {
        remark: [
          { required: true, message: "请输入反馈内容", trigger: "blur" },
        ],
      },
      currentFildId: "",
      enterpriseLabel: [],
      multipleSelection: [],
      selectList: [],
      imageUrl: "",
      dialogImageUrl: "",
      dialogImageUrl2: "",
      dialogVisible: false,
      dialogVisible2: false,
      dialogcustomize: false,
      inputObj: {},
      detailsFlag: false,
      deliveryPost: false,
      isEditTitle: "",
      newaddFlag: false,
      perfectFlag: false,
      findFlag: false,
      newfindFlag: false,
      pageSizes: [10, 15, 50, 100],
      pagesize: 10,
      total: 10,
      currentPage: 1,
      pageSizes1: [50, 100, 200],
      pagesize1: 50,
      total1: 10,
      currentPage1: 1,
      pageSizes2: [50, 100, 200],
      pagesize2: 50,
      total2: 10,
      currentPage2: 1,
      pageSizes3: [50, 100, 200],
      pagesize3: 50,
      total3: 10,
      currentPage3: 1,
      tableData: [],
      searchObj: {},
      fileId: "",
      enterpriseId: "",
      videoId: "",
      videoCode: "",
      videoAddr: "",
      fileIdList: [],
      addlable: [],
      //完善企业
      profileObj: {},
      newtagLIst: [],
      checkList: [],
      tagList: "",
      tagList1: [],
      selectqiyeList: [],
      jobCreentId: "",
      canhuigangweiFlag: false,
      currentdetailsId: "",
      flag: "",
      videoCode: "",
    };
  },
  created() {
    this.uploadHeader.Authorization = this.requestToken;
    this.queryList();
  },
  methods: {
    //是否禁用checkbox
    canSelect(row) {
      if (row.canDelivery == false) {
        return false;
      } else {
        return true;
      }
    },
    dateChange(value) {
      this.$forceUpdate();
    },
    // editdetailsClick(row) {
    //   this.isEditTitle = "编辑招聘会";
    //   this.flag = 1;
    //   this.uploadData = {
    //     relativeId: "",
    //     attachmentType: "0",
    //   };
    //   this.currentdetailsId = row.id;
    //   let params = {
    //     jobId: row.id,
    //   };
    //   this.showLoading();
    //   this.$axios({
    //     method: "get",
    //     url: `/hire/queryJobDetail`,
    //     headers: {
    //       Authorization: this.requestToken,
    //     },
    //     data: params,
    //     params: params,
    //   })
    //     .then((res) => {
    //       this.hideLoading();
    //       console.log("res---->:", res);
    //       if (res.data.code == 20000) {
    //         this.newaddFlag = true;
    //         this.inputObj = res.data.data;
    //         this.inputObj.time = [
    //           res.data.data.beginTime,
    //           res.data.data.endTime,
    //         ];
    //         if (
    //           res.data.data.attachmentAddr &&
    //           res.data.data.attachmentAddr.length
    //         ) {
    //           this.fileUrlList = [
    //             {
    //               url: res.data.data.attachmentAddr,
    //               fileId: res.data.data.fileId,
    //             },
    //           ];
    //           this.fileId = res.data.data.fileId;
    //         } else {
    //           this.fileUrlList = [];
    //         }
    //       } else {
    //         this.$message({
    //           message: res.data.message,
    //           type: "error",
    //         });
    //       }
    //     })
    //     .catch((err) => {
    //       this.hideLoading();
    //       this.$message({
    //         message: err,
    //         type: "error",
    //       });
    //     });
    // },
    zhaopinhuiClose() {
      this.zhaopinhuiFlag = false;
    },
    lookdetailsClick(row) {
      this.zhaopinhuiObj = row;
      this.zhaopinhuiFlag = true;
    },
    detailsgangweiClose() {
      this.detailsgangweiFlag = false;
    },
    canhuigwClose() {
      this.canhuigangweiFlag = false;
    },
    detailsqiyeClose() {
      this.detailsqiyeFlag = false;
    },
    detailsgwClick(row) {
      this.detailsgangweiFlag = true;
      this.detailsGWObj = row;
    },
    detailssqClick(row) {
      let params = {
        orgCode: row.orgCode,
      };
      this.showLoading();
      this.$axios({
        method: "get",
        url: `/hire/queryEnterpriseIntroduce`,
        headers: {
          Authorization: this.requestToken,
        },
        params: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.detailsqiyeFlag = true;
            this.detailsqiyeObj = res.data.data;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    shenhesqClick(row) {
      let self = this;
      let params = {
        checkStatus: "1",
        enterpriseIdList: [row.id],
        jobId: self.jobCreentId,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/checkEnterprise`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.$message.success("审核成功！");
            self.displayCompany(0, self.jobCreentId);
            this.queryList();
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    allshenheClick() {
      let self = this;
      if (!self.selectqiyeList || !self.selectqiyeList.length) {
        self.$message.error("请选择数据！");
        return;
      }
      let params = {
        checkStatus: "1",
        enterpriseIdList: self.selectqiyeList.map((value) => value["id"]),
        jobId: self.jobCreentId,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/checkEnterprise`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.$message.success("审核成功！");
            self.displayCompany(0, self.jobCreentId);
            this.queryList();
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    handleSelectionqiyeChange(value) {
      console.log(value);
      this.selectqiyeList = value;
    },
    cellChange(row, column, cell, event) {
      this.jobCreentId = row.id;
      if (column.label == "申请参会企业数") {
        this.canjiashenqtitle = "申请参会企业数";
        this.canhuiqiyeFlag = true;
        this.displayCompany(0, row.id);
      } else if (column.label == "参会企业数") {
        this.canjiashenqtitle = "参会企业数";
        this.canhuiqiyeFlag = true;
        this.displayCompany(1, row.id);
      } else if (column.label == "参会岗位数") {
        this.canhuigangweiFlag = true;
        this.displayGangwei();
      }
    },
    displayGangwei() {
      let params = {
        jobId: this.jobCreentId,
        pageNumber: this.currentPage3,
        pageSize: this.pagesize3,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/queryAttendingJobStationByPage`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.tablegwList = res.data.data.list;
            this.pagesize3 = res.data.data.pageSize;
            this.total3 = res.data.data.total;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    displayCompany(value, id) {
      let params = {
        checkStatus: value,
        jobId: id,
        pageNumber: this.currentPage2,
        pageSize: this.pagesize2,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/queryAttendingEnterPriseByPage`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.tableqiyeData = res.data.data.list;
            this.pagesize2 = res.data.data.pageSize;
            this.total2 = res.data.data.total;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    queryGangwei() {
      let params = {
        pageNumber: this.currentPage1,
        pageSize: this.pagesize1,
        qucryType: 1,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/queryJobStations`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.deliveryPost = true;
            this.tablegangweiData = res.data.data.list;
            this.pagesize1 = res.data.data.pageSize;
            this.total1 = res.data.data.total;
          } else if (res.data.code == "40003") {
            this.centerDialogVisible = true;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    detailsClick(row) {
      this.currentzpId = row.id;
      // this.queryGangwei();
      let params = {
        pageNumber: this.currentPage1,
        pageSize: this.pagesize1,
        queryType: 1,
        jobId: this.currentzpId,
      };
      this.showLoading();
      this.$axios({
        method: "post",
        url: `/hire/queryJobStations`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.deliveryPost = true;
            this.tablegangweiData = res.data.data.list;
            this.pagesize1 = res.data.data.pageSize;
            this.total1 = res.data.data.total;
          } else if (res.data.code == "40003") {
            this.centerDialogVisible = true;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    closedialogcustomize() {
      this.dialogcustomize = false;
    },

    adddialogcustomize() {
      let param = {
        value: this.customize,
        label: this.customize,
      };
      this.options.push(param);
      this.enterpriseLabel.push(this.customize);
      this.dialogcustomize = false;
      console.log(this.customize);
    },
    addcustomize() {
      this.dialogcustomize = true;
      this.customize = "";
    },
    submitForm() {
      this.handleRemove();
    },

    addrecruit() {
      this.submit();
      // this.inputObj = {};
      // this.$refs.upload.clearFiles();
    },
    handleExceed2(files, fileList) {
      this.$message.warning("只能上传1个视频");
    },
    beforeAvatarUpload(file) {
      console.log("before", file);
    },
    beforeVideoUpload(file) {
      this.showLoading("上传中");
      console.log("before---video", file);
      const isLt2M = file.size / 1024 / 1024 < 500;
      if (!isLt2M) {
        this.$message.warning("上传视频大小不能超过 500M!");
        this.hideLoading();
        return isLt2M;
      }
      // this.multfileImg = file;
      return isLt2M;
    },
    onErrorMethod(err) {
      this.hideLoading();
      console.log("err-----", err);
    },
    onErrorMethod3(err) {
      console.log("err-----video", err);
    },
    handleVideoSuccess(response) {
      console.log(this.fileUrlList1);
      console.log("response----", response);
      if (response.code == 20000) {
        this.hideLoading();
        this.fileIdList.push(response.data.id);
        this.$message.success("上传视频成功");
        this.videoId = response.data.id;
        this.videoCode = response.code;
        this.videoAddr = response.data.attachmentAddr;
        this.disabled = false;
      } else {
        this.hideLoading();
        this.$message.error("上传视频失败");
      }
    },
    canhuiqiyecancel() {
      this.canhuiqiyeFlag = false;
      this.tableqiyeData = [];
    },
    gangweicancel() {
      this.deliveryPost = false;
      this.tablegangweiData = [];
    },
    //查询
    handleSelectiongangweiChange(value) {
      this.selectList = value;
    },
    tableHeaderColor({ row, column, rowIndex, columnIndex }) {
      return "background-color:#f5f5f5;color:#626262;";
    },
    rowStyle({ row, rowIndex }) {
      let style1 = {};
      let style2 = {};
      if (rowIndex % 2 == 0) {
        style1.background = "#ffffff";
        return style1;
      } else {
        style2.background = "#f5f5f5";
        return style2;
      }
    },
    allExportClick() {},
    queryList() {
      console.log(151515);
      let self = this;
      let params = {
        fileName: this.searchObj.fileName,
        pageNumber: this.currentPage,
        pageSize: this.pagesize,
      };
      this.showLoading();
      this.$axios({
        method: "get",
        url: `/system/queryAttachmentByPage`,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
        params: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
            this.tableData = res.data.data.list;
            // this.profileObj = res.data.data.list;

            // this.pagesize = res.data.data.pageSize;
            this.total = res.data.data.total;
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    beforeUpload(file) {
      this.showLoading("导入中");
    },
    uploadProgress(event, file, fileList) {
      this.videoUploadPercent = file.percentage.toFixed(0) + "%";
      console.log("event--------", event);
      console.log("file--------", file);
      console.log("fileList--------", fileList);
    },
    uploadSucess(response) {
      this.$message({
        message: "导入成功！",
        type: "success",
      });
      this.hideLoading();
      console.log("response------", response);
    },
    uploadError(error) {
      this.$message({
        message: "导入失败！",
        type: "error",
      });
      this.hideLoading();
      console.log("error-----", error);
    },
    //关闭
    resetdetermine() {
      this.perfectFlag = false;
      this.disabled = true;
      this.videoCode = "";
      this.$refs.upload.clearFiles();
      this.queryList();
      //   let self = this;
      //   console.log(this.fileUrlList1);
      //   return;
      //   this.showLoading();
      //   this.$axios({
      //     method: "post",
      //     url: `/system/uploadFile`,
      //     headers: {
      //       Authorization: this.requestToken,
      //     },
      //     // data: params,
      //   })
      //     .then((res) => {
      //       this.hideLoading();
      //       console.log("res---->:", res);
      //       if (res.data.code == "20000") {
      //         self.$message.success("上传成功");
      //         this.videoId=res.data.
      //         this.perfectFlag = false;
      //         let videoCode = res.data.code;
      //         this.$refs.upload.clearFiles();
      //         this.profileObj = {};
      //       } else {
      //         this.$message({
      //           message: res.data.message,
      //           type: "error",
      //         });
      //       }
      //     })
      //     .catch((err) => {
      //       this.hideLoading();
      //       this.$message({
      //         message: err,
      //         type: "error",
      //       });
      //     });
    },
    // 新建确认和修改确认
    submit() {
      let self = this;
      let params = {};
      this.showLoading();
      this.$axios({
        method: "post",
        url: url,
        headers: {
          Authorization: this.requestToken,
        },
        data: params,
        params: params,
      })
        .then((res) => {
          this.hideLoading();
          console.log("res---->:", res);
          if (res.data.code == "20000") {
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    // 取消点击
    cancel() {
      this.newaddFlag = false;
      this.inputObj = {};
      this.fileUrlList = [];
      this.perfectFlag = false;
    },
    // 取消点击
    handleClose() {
      this.cancel();
    },
    // 点击分页当前页多少数据
    handleSizeChange(val) {
      this.pagesize = val;
      this.queryList();
    },
    handleSizeChange3(val) {
      this.pagesize3 = val;
      this.displayGangwei();
    },
    // 点击分页页数
    handleCurrentChange3(val) {
      this.currentPage3 = val;
      this.displayGangwei();
    },
    handleSizeChange1(val) {
      this.pagesize1 = val;
      this.queryGangwei();
    },
    // 点击分页页数
    handleCurrentChange1(val) {
      this.currentPage1 = val;
      this.queryGangwei();
    },
    handleSizeChange2(val) {
      this.pagesize2 = val;
      let num = "";
      let id = this.jobCreentId;
      if ((this.canjiashenqtitle = "申请参会企业数")) {
        num = 0;
      } else {
        num = 1;
      }
      this.displayCompany(num, id);
    },
    // 点击分页页数
    handleCurrentChange2(val) {
      this.currentPage2 = val;
      let num = "";
      let id = this.jobCreentId;
      if ((this.canjiashenqtitle = "申请参会企业数")) {
        num = 0;
      } else {
        num = 1;
      }
      this.displayCompany(num, id);
    },
    // 点击分页页数
    handleCurrentChange(val) {
      this.currentPage = val;
      this.queryList();
    },
    //  重置
    reset() {
      this.searchObj = {};
      this.createTime = [];
      this.queryList();
    },
    progressClose() {
      this.progressFlag = false;
    },
    addPolice() {
      this.newaddFlag = true;
      this.isEditTitle = "创建招聘会";
      this.flag = 0;
      this.uploadData = {
        relativeId: "",
        attachmentType: "0",
      };
    },

    //上传附件
    addAttachment() {
      let self = this;
      this.perfectFlag = true;
      //   this.showLoading();
      //   this.$axios({
      //     method: "get",
      //     // url: `/hire/queryEnterpriseBaseInfo`,
      //     headers: {
      //       Authorization: this.requestToken,
      //     },
      //     // data: params,
      //     // params: params
      //   })
      //     .then((res) => {
      //       this.hideLoading();
      //       console.log("res---->:", res);
      //       if (res.data.code == "20000") {
      //         this.profileObj = res.data.data;
      //         this.currentFildId = res.data.data.relativeId;
      //         let videofile = res.data.data.attachmentAvi || {};
      //         // shipin
      //         if (videofile.attachmentAddr && videofile.attachmentAddr.length) {
      //           this.fileUrlList1 = [
      //             {
      //               name: videofile.attachmentName,
      //               url: videofile.attachmentAddr,
      //               fileId: videofile.id,
      //             },
      //           ];
      //         } else {
      //           this.fileUrlList1 = [];
      //         }
      //         console.log(videofile);

      //         let biaoarry = res.data.data.tagList || [];
      //         console.log("self.options----", self.options);
      //         biaoarry.forEach((item) => {
      //           if (!self.options.map((val) => val["value"]).includes(item)) {
      //             self.options.push({
      //               value: item,
      //               label: item,
      //             });
      //           }
      //         });
      //         this.enterpriseLabel = res.data.data.tagList;
      //         // console.log("newtag----->", this.newtagLIst);
      //         this.UrlList = res.data.data.attachmentPicList || [];
      //         console.log(this.UrlList);
      //         let list = [];
      //         this.UrlList.forEach((item) => {
      //           list.push({
      //             url: item.attachmentAddr,
      //             fileId: item.id,
      //           });
      //         });

      //         this.fileUrluploadList = list;
      //         this.uploadData2 = {
      //           relativeId: this.currentFildId || "",
      //           attachmentType: "1",
      //         };
      //         this.uploadDataVideo = {
      //           relativeId: this.currentFildId || "",
      //           attachmentType: "2",
      //         };

      //         // this.pagesize = res.data.data.pageSize;
      //         // this.total = res.data.data.total;
      //       } else {
      //         this.$message({
      //           message: res.data.message,
      //           type: "error",
      //         });
      //       }
      //     })
      //     .catch((err) => {
      //       this.hideLoading();
      //       this.$message({
      //         message: err,
      //         type: "error",
      //       });
      //     });
    },

    // 详情关闭
    detailsClose() {
      this.detailsFlag = false;
    },
    // 修改
    editClick() {
      this.newaddFlag = true;
    },
    //图片删除
    // handleRemove(file, fileList) {
    //   console.log("file------>", file);
    //   if (file && file.status === "success") {
    //     this.showLoading();
    //     let params = {
    //       attachmentId: file.fileId,
    //       attachmentType: "0",
    //     };
    //     this.$axios({
    //       method: "get",
    //       url: `/hire/deleteAttachment`,
    //       headers: {
    //         Authorization: this.requestToken,
    //       },
    //       params: params,
    //     })
    //       .then((res) => {
    //         this.hideLoading();
    //         if (res.data.code == "20000") {
    //           this.fileUrlList = [];
    //           this.$message.success("删除成功！");
    //         } else {
    //           this.$message({
    //             message: res.data.message,
    //             type: "error",
    //           });
    //         }
    //       })
    //       .catch((err) => {
    //         this.hideLoading();
    //         this.$message({
    //           message: err,
    //           type: "error",
    //         });
    //       });
    //   }
    // },
    //图片删除
    // handleRemove1(file, fileList) {
    //   let self = this;
    //   console.log("file------", file);
    //   console.log("fileUrluploadList----", this.fileUrluploadList);
    //   if (file && file.status === "success") {
    //     this.showLoading();
    //     let params = {
    //       attachmentId: file.fileId,
    //       attachmentType: "1",
    //     };
    //     this.$axios({
    //       method: "get",
    //       url: `/hire/deleteAttachment`,
    //       headers: {
    //         Authorization: this.requestToken,
    //       },
    //       params: params,
    //     })
    //       .then((res) => {
    //         this.hideLoading();
    //         if (res.data.code == "20000") {
    //           this.fileUrluploadList.forEach((item, index) => {
    //             if (item.fileId == file.fileId) {
    //               self.fileUrluploadList.splice(index, 1);
    //             }
    //           });
    //           this.$message.success("删除成功！");
    //         } else {
    //           this.$message({
    //             message: res.data.message,
    //             type: "error",
    //           });
    //         }
    //       })
    //       .catch((err) => {
    //         this.hideLoading();
    //         this.$message({
    //           message: err,
    //           type: "error",
    //         });
    //       });
    //   }
    // },
    //视频上传
    handlePreview(file) {
      console.log(file);
      console.log(this.fileUrlList1);
    },
    //视频删除
    handleRemove(file, fileList) {
      console.log(file);
      console.log(fileList);
      this.showLoading();
      console.log("videofile----", file);
      let params = {
        id: this.videoId,
      };
      this.$axios({
        method: "get",
        url: `/system/deleteFile`,
        headers: {
          Authorization: this.requestToken,
        },
        params: params,
      })
        .then((res) => {
          this.hideLoading();
          if (res.data.code == "20000") {
            // this.fileUrlList = [];
            this.$message.success("删除成功！");
            this.videoCode = "";
            this.disabled = true;
            this.$refs.upload.clearFiles();
          } else {
            this.$message({
              message: res.data.message,
              type: "error",
            });
          }
        })
        .catch((err) => {
          this.hideLoading();
          this.$message({
            message: err,
            type: "error",
          });
        });
    },
    //查询企业数量
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    findClose() {
      this.findFlag = false;
    },
    newfindClose() {
      this.newfindFlag = false;
      if (this.newfindFlag == false) {
        this.findFlag = true;
      }
    },
    //产看企业介绍
    handleClick(row) {
      this.newfindFlag = true;
    },
  },
};
</script>
<style scoped>
.common-title-flex {
  display: flex;
}
.common-title-div {
  width: 3px;
  height: 16px;
  background-color: #368af7;
  margin-top: 2px;
}
.common-title-text {
  margin-left: 4px;
  font-size: 14px;
}
.common-list-class {
  display: flex;
  justify-content: space-between;
  margin-top: -10px;
}
.upload-file >>> .el-upload--text {
  border: none;
  width: 100px;
  height: 36px;
}
.el_card_class >>> .el-card__body {
  padding: 10px !important;
}
/* .el-form-item >>>.el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 90px;
  height: 90px;
} */
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
/* .el-form-item{
  font-size: 20px;
  color: #8c939d;
  width: 20px;
  height: 20px;
  line-height: 90px;
  text-align: center;
} */
.avatar {
  width: 178px;
  height: 178px;
  display: block;
}
.avatar-uploader >>> .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 70px;
  height: 70px;
}
/* 完善图片上传 */
.avatar-uploader .el-upload:hover {
  border-color: #409eff;
}
.avatar-uploader-icon {
  display: block;
  font-size: 22px;
  color: #8c939d;
  width: 70px;
  height: 70px;
  line-height: 70px;
  text-align: center;
}
.avatar {
  width: 70px;
  height: 70px;
  display: block;
}
</style>
